#include"QuickSort.h"

void TestQuickSort()
{
	//int a[] = { 4,7,1,9,3,6,5,8,3,2,0 };
	int a[] = { 6,1,2,7,9,3,4,5,10,8 };

	for (int i = 0; i < 10; ++i)
	{
		printf("%d ", a[i]);
	}
	printf("\n");

	QuickSort(a, 0, sizeof(a) / sizeof(int) - 1);
	//PartSort3(a, 0, sizeof(a) / sizeof(int) - 1);

	for (int i = 0; i < 10; ++i)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}

void TestQuickSortR()
{
	int a[] = { 6,1,2,7,9,3,4,5,10,8 };

	for (int i = 0; i < 10; ++i)
	{
		printf("%d ", a[i]);
	}
	printf("\n");

	QuickSortR(a, 0, sizeof(a) / sizeof(int) - 1);

	for (int i = 0; i < 10; ++i)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}


int main()
{
	
	//TestQuickSort();
	TestQuickSortR();
	return 0;
}